home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 138 / 138.d81 / b.rr convert (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  7KB  |  181 lines

  1. 50 poke53281,0:poke53280,0:print"[147]":gosub60000:fort=0to3000:next
  2. 60 poke53280,15:poke53281,15:poke646,0
  3. 80 sp$=""
  4. 100 print"[147]"chr$(142):q$=chr$(13)
  5. 110 br$=" [144]                   "+sp$+sp$+"                   [146] 
  6. 120 mr$[178]" stop"[170]sp$[170]"      model railroad conversions    stop  "[170]sp$[170]"wait ":hr$[178]br$[170]mr$[170]br$
  7. 130 g$[178]" stop"[170]sp$[170]"        g - lgb - 1/22.5 scale      stop  "[170]sp$[170]"wait 
  8. 140 o$=" [144]"+sp$+"       o - lionel - 1/48 scale      [144]  "+sp$+"[146] 
  9. 150 s$[178]" stop"[170]sp$[170]"    s - american flyer - 1/64 scale stop  "[170]sp$[170]"wait 
  10. 160 h$=" [144]"+sp$+"            ho - 1/87 scale         [144]  "+sp$+"[146] 
  11. 170 n$[178]" stop"[170]sp$[170]"            n - 1/120 scale         stop  "[170]sp$[170]"wait 
  12. 180 z$=" [144]"+sp$+"            z - 1/220 scale         [144]  "+sp$+"[146] 
  13. 190 w$[178]" stop"[170]sp$[170]"           weight conversion        stop  "[170]sp$[170]"wait 
  14. 200 t$=" [144]"+sp$+"           grade calculation        [144]  "+sp$+"[146] 
  15. 210 gc[178].5:oc[178].25:sc[178].188:hc[178].138:nc[178].075:zc[178].055:gd$[178]"what is the % of grade
  16. 220 ht$="rise height [ in inches ]":lt$="length of grade [ in feet ]
  17. 230 mt$[178]"      minimum turnout - # 6":tk$[178]"track center distance - 
  18. 240 ra$="       minimum radius - ":rc$="           recomended - 
  19. 250 pr$[178]"            prototype - ":th$[178]"   overhead clearance - 
  20. 260 sa$=" scale track and rail data (min)":ou$=" ounce":oz$=" ounces
  21. 270 in$[178]" inch     ":im$[178]" inch min":up$[178]"onononononononononon":sk$[178]sa$[170]q$[170]tk$
  22. 280 ih$[178]im$[170]q$[170]th$:ia$[178]im$[170]q$[170]ra$:ic$[178]in$[170]q$[170]rc$:ir$[178]in$[170]q$[170]pr$:it$[178]in$[170]q$[170]mt$
  23. 290 cw$[178]" car weight in ounces - ":cl$[178]q$[170]" plus 1/2 oz for each inch of car length
  24. 300 cm$=q$+" plus 1/4 oz for each inch of car length
  25. 310 co$[178]q$[170]" plus 1 oz for each inch of car length":nd$[178]"no data yet
  26. 320 s2$="o":s3$="s":s4$="ho":s5$="n
  27. 360 [153]"load"hr$q$"   select"q$"   1) g  - lgb - scale feet"q$
  28. 370 [153]"   2) o  - lionel - scale feet"q$"   3) s  - american flyer - scale feet"q$
  29. 380 [153]"   4) ho - scale feet"q$"   5) n  - scale feet"q$"   6) z  - scale feet"q$
  30. 390 [153]"   7) weight conversion"q$"   8) grade calculation"q$"   9)  quit wait
  31. 400 getr$:ifr$=""then400
  32. 410 r=val(r$)
  33. 420 onrgoto440,450,460,470,480,490,500,1310,1600
  34. 430 goto400
  35. 440 tl$=br$+g$+br$:cv=gc:goto540
  36. 450 tl$=br$+o$+br$:cv=oc:goto540
  37. 460 tl$=br$+s$+br$:cv=sc:goto540
  38. 470 tl$=br$+h$+br$:cv=hc:goto540
  39. 480 tl$=br$+n$+br$:cv=nc:goto540
  40. 490 tl$=br$+z$+br$:cv=zc:goto540
  41. 500 tl$=br$+w$+br$:goto820
  42. 540 print"[147][145]"tl$q$" select type conversion"q$" 1) full size to scale [ in feet ]"q$
  43. 550 print" 2) scale to full size [ in inches ]"q$" 3)  return to main menu "q$
  44. 560 print"  press[146]  _  for rail data"q$
  45. 570 geta$:ifa$=""then570
  46. 580 ifa$="_"ora$="^"ora$="="thenonrgosub1790,1670,1700,1730,1760,1790:goto540
  47. 590 ifa$="3"ora$=chr$(13)then360
  48. 600 a=val(a$):ifa<1ora>3then570
  49. 610 un$="":input"unit:";un$:un=val(un$):ifun=0then540
  50. 620 ifa=1thenvn$="feet
  51. 630 [139]a[178]1[175]un[178]1[167]vn$[178]"foot
  52. 640 ifa=2thenvn$="inches
  53. 650 [139]a[178]2[175]un[178]1[167]vn$[178]"inch
  54. 660 print"[145]"tab(((30+len(un$))/2)-3)vn$:printq$"converted it's:
  55. 670 [145]a[137]680,720
  56. 680 am[178]cv[172]un:io$[178]"  inches wait or":fe$[178]"  feet wait":[139]am[178]1[167]io$[178]"  inch wait or
  57. 690 ft=am/12:am$=str$(am):ft$=str$(ft)
  58. 700 ifam<.01thenprint"too small for proper calculation[146]":forx=1to1750:next:goto540
  59. 710 printq$left$(am$,7);io$left$(ft$,6);fe$:goto760
  60. 720 am=un/cv:fe$="  feet [146] or":io$="  inches [146]":ifam=1thenfe$="  foot [146]
  61. 730 [139]am[179].01[167][153]"too small for proper calculationwait":[129]x[178]1[164]1750:[130]:[137]540
  62. 740 ft[178]am[172]12:am$[178][196](am):ft$[178][196](ft)
  63. 750 [153]q$[200](am$,7);fe$q$""[200](ft$,6);io$
  64. 760 [153]"        press any key to continue wait
  65. 770 geta$:ifa$=""then770
  66. 780 goto540
  67. 820 print"[147]"tl$q$" select type conversion"q$" 1) car weight vs length"q$
  68. 830 print" 2) grams to ounces"q$
  69. 840 print" 3) ounces to grams"q$" 4)  return to main menu "q$
  70. 850 geta$:ifa$=""then850
  71. 860 ifa$="4"ora$=chr$(13)then360
  72. 870 a=val(a$):ifa<1ora>4then850
  73. 880 ifa<>1then1200
  74. 890 oz$=" ounces":gm$=" grams":r=0:r$="
  75. 900 [153]"loadselect scale"q$"   1) g  - lgb - "q$"   2) o  - lionel - 
  76. 910 print"   3) s  - american flyer -"q$"   4) ho - "q$"   5) n  - "q$
  77. 920 print"   6) z  - "q$"   _)  go back to previous menu [146]"q$
  78. 930 ifr=6orr=1then950
  79. 940 ifr>0then960
  80. 950 getr$:ifr$=""then950
  81. 960 r=val(r$):o2=5:s3=2:h4=1:n5=.5
  82. 970 ifr<1orr>6thengoto820
  83. 980 ifr=2thensu$=s2$:goto1040
  84. 990 ifr=3thensu$=s3$:goto1040
  85. 1000 ifr=4thensu$=s4$:goto1040
  86. 1010 ifr=5thensu$=s5$:goto1040
  87. 1020 ifr=1orr=6thenprint""nd$" press any key to continue: [146]":gosub1810
  88. 1030 goto900
  89. 1040 cl=0:cl$="":print"length of  "su$;:input" [146] car [in inches]";cl$
  90. 1050 ifcl$="_"then820
  91. 1060 cl=val(cl$):ifcl=0then900
  92. 1070 ifr=2thentw=cl*1+o2:goto1110
  93. 1080 ifr=3thentw=cl*.5+s3:goto1110
  94. 1090 ifr=4thentw=cl*.5+h4:goto1110
  95. 1100 ifr=5thentw=cl*.25+n5:goto1110
  96. 1110 wg=tw*28.35
  97. 1120 print""tw;oz$" or ";wg;gm$
  98. 1130 ll$="       [164][164][164][164][164][164][164][164][164][164][164][164]              
  99. 1140 [153]ll$q$" press  - return - wait to recalculate 
  100. 1150 print"[164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]
  101. 1160 [153]" press any key to return to main menu 
  102. 1170 getx$:ifx$=""then1170
  103. 1180 ifx$=chr$(13)then900
  104. 1190 goto820
  105. 1200 un$="":input"unit:";un$:un=val(un$):ifun=0then820
  106. 1210 ifa=2andun=1thengm$="gram":goto1230
  107. 1220 ifa=3andun=1thenoz$=ou$
  108. 1230 print"converted":onagoto820,1240,1250
  109. 1240 am=.0353*un:printq$un;gm$" ="am;oz$:goto1270
  110. 1250 am=28.35*un:ifam=<1thengm$="gram
  111. 1260 [153]q$un;oz$" ="am" "gm$
  112. 1270 [153]" press any key to continue: wait
  113. 1280 geta$:ifa$=""then1280
  114. 1290 goto820
  115. 1310 rem
  116. 1330 print"[147]"br$+t$+br$:lg=0:rh=0
  117. 1340 print"[145]"q$" select type conversion"q$" 1) find % of grade"q$
  118. 1350 print" 2) find length of grade"q$" 3) find rise height"q$
  119. 1360 print" 4)  return to main menu [146]
  120. 1370 [161]a$:[139]a$[178]""[167]1370
  121. 1380 a[178][197](a$):[145]a[137]1400,1450,1470,360
  122. 1390 [137]360
  123. 1400 [153]lt$;:[133]lg:[153]ht$;:[133]rh:[139]rh[178]0[176]lg[178]0[167]1330
  124. 1410 gc[178]rh[173](lg[172]12)[172]100:gc$[178][196](gc):[139]gc[179].010[167][137]1440
  125. 1420 [139]gc[177]50[167][153]"more than 50% gradewait":[129]t[178]1[164]1750:[130]:[137]1330
  126. 1430 [153]""[200](gc$,5)[170][199](37)[170]" grade":[137]1520
  127. 1440 [153]"less than .010 % gradewait":[129]t[178]1[164]1750:[130]:[137]1330
  128. 1450 [153]gd$;:[133]gc:[153]ht$;:[133]rh:[139]gc[178]0[176]rh[178]0[167]1330
  129. 1460 lg[178](rh[172]100)[173]gc[173]12:lg$[178][196](lg):[153]""[200](lg$,5)" feet":[137]1520
  130. 1470 [153]gd$;:[133]gc:[153]lt$;:[133]lg:[139]gc[178]0[176]lg[178]0[167]1330
  131. 1480 rh[178](lg[172]12)[172](gc[173]100):rh$[178][196](rh)
  132. 1490 [139]rh[179]12[167][153]""[200](rh$,5)" inches":[137]1520
  133. 1500 [139]rh[177]12[167]rf[178]rh[173]12:rf$[178][196](rf)
  134. 1510 [153]""[200](rh$,5)" inches or "[200](rf$,5)" feet
  135. 1520 ll$="       [164][164][164][164][164][164][164][164][164][164][164][164]              
  136. 1530 [153]ll$q$" press  - return - wait to recalculate 
  137. 1540 print"[164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]
  138. 1550 [153]" press any key to return to main menu 
  139. 1560 getx$:ifx$=""then1560
  140. 1570 ifx$=chr$(13)then1330
  141. 1580 goto360
  142. 1600 goto40000
  143. 1670 printup$"o"sk$" 5"ih$" 5 1/2"ia$"36"ic$"48"ir$"60"it$
  144. 1680 printq$cw$"5"oz$q$co$
  145. 1690 gosub1810:return
  146. 1700 printup$"s"sk$" 3 3/4"ih$" 4 1/8"ia$"27"ic$"36"ir$"45"it$
  147. 1710 printq$cw$"2 "oz$q$cl$
  148. 1720 gosub1810:return
  149. 1730 printup$"ho"sk$" 2 1/2"ih$" 3"im$" "q$ra$"18"ic$"24"ir$"30"it$
  150. 1740 printq$cw$"1"ou$q$cl$
  151. 1750 gosub1810:return
  152. 1760 printup$"n"sk$" 1 1/2"ih$" 1 1/2"ia$" 9"ic$"12"ir$